<extend name="template/base_index" />

<block name="area_header">

    <link rel="stylesheet" href="__CSS__/buy_good.css">
</block>

<block name="area_body">
    <form action="{:U('group/produce_order')}" method="post" id="forminfo">
        <div class="weui_cell">
            <div class="buy_tleft"><img src="http://muyin.8raw.com/api.php/picture/index?id={$imglist}" width="80px" height="80px"></div>
            <div class="buy_tright "><span class="buy_xname">{$name}</span></br><i class="fa fa-jpy"></i><span class="buy_xprice">{$price}</span></br><span class="buy_xway">浙江杭州|在线交易</span></div>
        </div>
        <div class="buy_addre">
            <if  condition ="$addrecount gt 0 ">

                <div class="buy_addre_left">
                    <a  href="{:U('User/select_address',array('type'=>1))}">
                    <div class="buy_shr"><span>收货人：{$contactname}</span><span class="buy_tel">{$mobile}</span></div>
                    <div class="buy_dzx">收货地址：{$province}{$city}{$area}{$detailinfo}</div>
                    </a>
                </div>
                <a class="buy_addre_right" href="{:U('User/select_address',array('type'=>1))}"><i class="fa fa-chevron-right"></i></a>
                <input type="hidden" id="signaddre" value="1">
                <input type="hidden" name='type' id="type" value="{$type}">
                <input type="hidden" name="group_id" id="group_id" value="{$groupid}">
                <input type="hidden" name="counttype" id="counttype" value="{$counttype}">
            <else />
                <div class="buy_addre_left">
                    <div class="buy_shr"><span>收货人：</span><span class="buy_tel"></span></div>
                    <div class="buy_dzx">收货地址：</div>
                </div>
                    <a class="buy_addre_right" href="{:U('UserCenter/add_addre',array('product_id' => $id,'type'=>1))}"><i class="fa fa-chevron-right"></i></a>

            </if>
        </div>
        <div class="weui_cells">
            <div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <p>购买数量</p>
                </div>
                <div class="weui_cell_ft">
                    <!--<input class="weui_input" type="number" placeholder="请输入购买数量最多{$number}" name="number">-->
                    数量：1
                </div>
            </div>
            <div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <p>运费</p>
                </div>
                <div class="weui_cell_ft">
                    快递：{$postage}
                </div>
            </div>
            <div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <p>实付金额</p>
                </div>
                <div class="weui_cell_ft">
                    <i class="fa fa-jpy"></i>{$price}
                </div>
            </div>
        </div>
        <a  class="weui_btn weui_btn_warn" onclick="submitform()">确认</a>
    </form>
    <script src="__JS__/jquery-weui.min.js"></script>
    <script>
        function submitform(){
            var signaddre = $('#signaddre').val();
            if(signaddre == 1){
                $('#forminfo').submit();
            }else{
                $.toast('收货地址不可以为空');
            }
        }

    </script>

</block>

